﻿@model IEnumerable<EasyScrum.Models.Task>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Story
        </th>
        <th>
            Title
        </th>
        <th>
            Description
        </th>
        <th>
            ToDo
        </th>
        <th>
            TaskDone
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Story.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ToDo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TaskDone)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.TaskId }) |
            @Html.ActionLink("Details", "Details", new { id=item.TaskId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.TaskId })
        </td>
    </tr>
}

</table>

@*<table>
@foreach (var tasks in Model.Task)
</table>*@
